#include "students.h"
#include <stdio.h>
#include <stdlib.h>

Student::Student(char *name) {
  this->name = name;
}

void Student::print() {
  printf("Student \"%s\"\n", this->name);
}

MyClass *alloc_class(int n) {
  MyClass *myClass = new MyClass();
  myClass->length = n;
  myClass->students = (Student *)malloc(sizeof(Student) * n);
  return myClass;
}

void print_class(MyClass *myClass) {
  for(int i=0; i < myClass->length; i++)
    myClass->students[i].print();
}
